package dujiu.luogu.circulation;

import java.util.Scanner;

/**
 * @author dujiu
 * @date 2025/3/1
 * @Description
 */
public class P5718 {

    // 给出n和n个整数aI,求这n个整数中最小值是什么
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // System.out.println("请输入整数n");
        int n = scanner.nextInt();
        scanner.nextLine();
        // 用字符串接受含有空格的数字
        // System.out.println("请输入n个整数");
        String line = scanner.nextLine();
        String[] strings  = line.split(" ");
        int[] nums = new int[strings.length];

        if (strings.length != n) {
            System.out.println("输入的整数数量与n不一致，请检查输入！");
            return;
        }

        for (int i = 0; i < strings.length; i++) {
            nums[i] = Integer.parseInt(strings[i]);
        }
        int MIX = nums[0];
        for (int num : nums) {
            if (num < nums[0]){
                MIX = num;
            }
        }
        System.out.println(MIX);
    }
}
